<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <title>致医优氧</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
        }

        body {
            background-color: #f5f5f5;
            padding-bottom: 60px;
            height: 100vh;
            overflow: hidden;
        }

        .container {
            max-width: 100%;
            margin: 0 auto;
            padding: 20px;
            background-color: #EEF4FE;
            min-height: calc(100vh - 60px);
            display: flex;
            flex-direction: column;
            overflow-y: auto; /* 添加滚动功能 */
            height: calc(100vh - 60px); /* 确保高度正确 */
        }

        .content {
            display: none;
            flex: 1; /* 填充可用空间 */
            overflow-y: auto; /* 允许内容滚动 */
        }

        .content.active {
            display: flex;
            flex-direction: column;
        }

        .header {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 20px;
        }

        .header img {
            width: 40px;
            height: 40px;
        }

        .header-text {
            font-size: 16px;
            color: #333;
        }

        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;

            background: white;
            border-radius: 12px;
            padding: 15px;
            margin: 20px 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .section-left, .section-right {
            flex: 1;
            display: flex;
            flex-direction: column;  /* 改为垂直排列 */
            align-items: center;     /* 水平居中 */
            gap: 8px;                /* 调整上下间距 */
            text-align: center;      /* 文字居中 */
        }

        /* 移除原来的gap:10px 修改为垂直间距 */
        .section-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            /* 移除gap属性 */
            background: white;
            border-radius: 12px;
            padding: 15px;
            margin: 20px 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .section-divider {
            width: 2px;
            height: 60px;
            background-color: #3E5E99;
            margin: 0 5px;
        }

        .section-icon {
            width: 94px;
            height: 94px;
            font-size: 64px; /* 保持emoji图标与容器比例协调 */
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .section-title {
            font-size: 18px;
            font-weight: 600;
            color: #3E5E99;
        }

        .section-subtitle {
            font-size: 16px;
            color: #666;
        }

        .package-container {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
        }

        .recommend-box {
            background: white;
            border-radius: 12px;
            padding: 15px;
            margin: 20px 0;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
        }

        .package {
            flex: 1;
            border: 1px solid #eee;
            border-radius: 8px;
            padding: 15px;
            background-color: #EEF4FE;
            text-align: center;
        }

        .package img {
            width: 40px;
            height: 40px;
            margin-bottom: 10px;
        }

        .package-title {
            font-weight: 500;
            margin-bottom: 8px;
        }

        .package-duration {
            color: #666;
            font-size: 14px;
            margin-bottom: 12px;
        }

        .package-price {
            color: #3E5E99;
            font-size: 18px;
            margin-bottom: 15px;
            font-weight: bold;
        }

        .package-price span {
            color: #999;
            font-size: 14px;
            text-decoration: line-through;
            margin-left: 8px;
        }

        .buy-btn {
            background: #92BEFA;
            border-radius: 20px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.05);
            color: white;
            padding: 8px 20px;
            display: inline-block;  /* 确保按钮宽度随内容变化 */
            white-space: nowrap;   /* 防止文字换行 */
            line-height: 1.5;      /* 优化文字垂直居中 */
            border: none;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
        }

        .buy-btn:hover {
            background: #7ca9e0;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }

        .nav {
            position: fixed;
            bottom: 0;
            width: 100%;
            height: 60px;
            background: #fff;
            display: flex;
            border-top: 1px solid #eee;
            margin: 0 auto;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
        }

        .nav-item {
            flex: 1;
            text-align: center;
            padding: 6px 0;
            color: #666;
            cursor: pointer;
            transition: color 0.2s;
            font-size: 12px;
        }

        .nav-item.active {
            color: #007bff;
            font-weight: 500;
        }

        .nav-item span {
            display: block;
            font-size: 20px;
        }

        /* 我的页面样式 */
        .user-info {
            display: flex;
            align-items: center;
            background: #f0f2f5;
            padding: 15px;
            margin: -20px -20px 20px;
            flex-shrink: 0; /* 防止压缩 */
            margin: -20px -20px 0; /* 调整上边距 */
        }

        .user-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            margin-right: 12px;
            background: linear-gradient(135deg, #3E5E99, #92BEFA);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: bold;
            font-size: 18px;
        }

        .user-details h3 {
            margin-bottom: 4px;
            font-size: 16px;
        }

        .user-details p {
            font-size: 14px;
            color: #666;
        }

        .switch-role {
            color: #007bff;
            font-size: 13px;
            margin-top: 4px;
        }

        .menu-item {
            display: flex;
            align-items: center;
            padding: 12px 0;
            border-bottom: 1px solid #eee;
            font-size: 16px;
            color: #333;
        }

        .menu-item span {
            font-size: 18px;
            width: 30px;
        }

        .user-details h3 {
            font-size: 18px;  /* 调大姓名字号 */
            color: #333;
        }
        .user-details p {
            font-size: 15px;  /* 调大电话字号 */
        }
        .switch-role {
            color: #3E5E99;  /* 改为品牌蓝色 */
            font-size: 13px;
        }
        .menu-item {
            padding: 15px 0;  /* 增加菜单项间距 */
        }
        .menu-item span {
            margin-right: 12px;  /* 增加图标右边距 */
        }
        .menu-grid {
            flex: 1; /* 填充剩余空间 */
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            grid-template-rows: repeat(2, 1fr); /* 两行，每行高度相等 */
            gap: 15px;
            padding: 0; /* 移除上下padding */
            min-height: 0; /* 允许内容收缩 */
            height: 100%; /* 确保高度正确 */
        }

        .grid-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            background: #92BDFA; /* 修改为要求的背景色 */
            border-radius: 8px;
            padding: 20px 10px;
            box-shadow: 0 2px 8px rgba(146,189,250,0.15);
            transition: all 0.3s;
            cursor: pointer;
            color: white;
            min-height: 0; /* 允许内容收缩 */
        }

        .grid-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 5px 15px rgba(146,189,250,0.3);
        }

        .grid-icon {
            font-size: 28px;
            margin-bottom: 8px;
        }

        .grid-text {
            font-size: 14px;
            color: white;
            text-align: center;
            font-weight: 500;
        }

        /* 会员信息条样式 */
        .member-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #92BDFA;
            border-radius: 8px;
            padding: 12px 20px;
            margin: 15px 0 25px;
            color: white;
            box-shadow: 0 2px 8px rgba(146,189,250,0.2);
            flex-shrink: 0; /* 防止压缩 */
        }

        .member-left {
            font-weight: 500;
            font-size: 15px;
        }

        .member-right {
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .member-right::after {
            content: ">";
            font-size: 16px;
        }

        /* 移除原有菜单项样式 */
        .menu-item {
            display: none !important;
        }

        /* 新增：为我的页面容器设置高度 */
        #mine {
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        /* 首页内容容器 */
        .home-content {
            flex: 1;
            overflow-y: auto;
        }
    </style>
</head>

<body>
<!-- 首页 -->
<div class="container content active" id="home">
    <div class="home-content">
        <div class="section-header">
            <div class="section-left">
                <span class="section-icon">🏠</span>
                <div class="section-title">预约氧疗</div>
            </div>
            <div class="section-divider"></div>
            <div class="section-right">
                <span class="section-icon">👤</span>
                <div class="section-title">会员权益</div>
            </div>
        </div>

        <div class="recommend-box">
            <p style="color:#3E5E99;margin-bottom:20px; text-align: center; font-weight: bold">购买氧疗权益包，氧疗更省钱！</p>

            <div class="package-container">
                <div class="package">
                    <div class="package-title">10次标准氧疗权益包</div>
                    <div class="package-duration">45分钟/次</div>
                    <div class="package-price">￥980 <span>￥1280</span></div>
                    <button class="buy-btn">立即购买</button>
                </div>
                <div class="package">
                    <div class="package-title">30次标准氧疗权益包</div>
                    <div class="package-duration">45分钟/次</div>
                    <div class="package-price">￥1980 <span>￥3840</span></div>
                    <button class="buy-btn">立即购买</button>
                </div>
            </div>

            <div class="package-container">
                <div class="package">
                    <div class="package-title">1次标准氧疗权益</div>
                    <div class="package-duration">45分钟/次</div>
                    <div class="package-price">￥128</div>
                    <button class="buy-btn">立即购买</button>
                </div>
                <div class="package">
                    <div class="package-title">1次深度氧疗权益</div>
                    <div class="package-duration">70分钟/次</div>
                    <div class="package-price">￥188</div>
                    <button class="buy-btn">立即购买</button>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 我的页面 -->
<div class="container content" id="mine">
    <div class="user-info">
        <div class="user-avatar">熊</div>
        <div class="user-details">
            <h3>熊维 编辑</h3>
            <p>186****5147</p>
        </div>
    </div>

    <!-- 会员信息条 -->
    <div class="member-bar">
        <div class="member-left">普通会员</div>
        <div class="member-right">购买氧疗权益包，氧疗更实惠</div>
    </div>

    <!-- 网格菜单 -->
    <div class="menu-grid">
        <div class="grid-item">
            <span class="grid-icon">📝</span>
            <div class="grid-text">健康档案</div>
        </div>
        <div class="grid-item">
            <span class="grid-icon">📦</span>
            <div class="grid-text">我的订单</div>
        </div>
        <div class="grid-item">
            <span class="grid-icon">📅</span>
            <div class="grid-text">预约氧疗</div>
        </div>
        <div class="grid-item">
            <span class="grid-icon">📣</span>
            <div class="grid-text">关注公众号</div>
        </div>
        <div class="grid-item">
            <span class="grid-icon">👥</span>
            <div class="grid-text">共享人</div>
        </div>
        <div class="grid-item">
            <span class="grid-icon">⚙️</span>
            <div class="grid-text">设置</div>
        </div>
    </div>
</div>

<!-- 底部导航栏 -->
<div class="nav">
    <div class="nav-item active" onclick="switchTab('home')">
        <span>🏠</span>首页
    </div>
    <div class="nav-item" onclick="switchTab('mine')">
        <span>👤</span>我的
    </div>
</div>

<script>
    function switchTab(tabId) {
        document.querySelectorAll('.content').forEach(el => el.classList.remove('active'));
        document.getElementById(tabId).classList.add('active');
        document.querySelectorAll('.nav-item').forEach(el => el.classList.remove('active'));
        event.target.closest('.nav-item').classList.add('active');
    }

    // 添加网格项点击效果
    document.querySelectorAll('.grid-item').forEach(item => {
        item.addEventListener('click', function() {
            this.style.transform = 'scale(0.95)';
            setTimeout(() => {
                this.style.transform = '';
            }, 200);
        });
    });
</script>
</body>

</html>
